#pragma once
#ifndef CLINKTREE_H
#define CLINKTREE_H
#include <string>
using namespace std;

class cLinkTreeNode
{
public:
	cLinkTreeNode* leftChildNode;
	cLinkTreeNode* rightChildNode;
	char data;
	cLinkTreeNode();
	cLinkTreeNode(char a);
	cLinkTreeNode(char a, cLinkTreeNode* l, cLinkTreeNode* r);
	~cLinkTreeNode();
};


class cLinkTree
{
public:
	cLinkTree(string str);
	~cLinkTree();

	void displayTree();

	cLinkTreeNode* head;

	void noRecursivePreorderTraversal();
	void recursivePreorderTraversal();
	int getWidth();
};

void deleteChildTree(cLinkTreeNode* childTree);
void displayChildTree(cLinkTreeNode* childTree);
void childRecursivePreorderTraversal(cLinkTreeNode* childTree);

#endif // !LINKTREE_H
